package cn.silver.module.authority.controller;

import cn.silver.framework.mybatis.controller.DataController;
import cn.silver.module.authority.bean.RoleBean;
import cn.silver.module.authority.domain.SysRole;
import cn.silver.module.authority.param.RoleParam;
import cn.silver.module.authority.service.ISysRoleService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 角色信息
 *
 * @author Silver Zhou
 */
@Slf4j
@Validated
@RestController
@RequiredArgsConstructor
@Tag(name = "权限管理-角色管理")
@RequestMapping("/system/role")
public class SysRoleController extends DataController<ISysRoleService, SysRole, RoleParam, RoleBean> {

    @Override
    @Resource
    public void setBaseService(ISysRoleService baseService) {
        this.baseService = baseService;
        this.setTitle("权限管理-角色管理");
        this.setCode("authority:role");
        this.setPermission("authority:role");
    }
}
